package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.SeriesandpicbookDao;
import com.victor.entity.Seriesandpicbook;

@Service
public class SeriesandpicbookServiceImpl implements com.victor.service.SeriesandpicbookService {

	@Autowired
	private SeriesandpicbookDao dao;

	@Override
	public boolean batchDelete(int[] ids) {
		return dao.batchDelete(ids) >= 0 ? true : false;
	}

	@Override
	public boolean insert(Seriesandpicbook record) {
		return dao.insert(record) > 0 ? true : false;
	}

	@Override
	public Seriesandpicbook findById(Integer spId) {
		return dao.findById(spId);
	}

	@Override
	public boolean update(Seriesandpicbook record) {
		return dao.update(record) > 0 ? true : false;
	}

	@Override
	public List<Seriesandpicbook> findBySid(Integer sid) {
		return dao.findBySid(sid);
	}

	@Override
	public boolean deletePictures(String sid, int[] ids) {
		return dao.deletePictures(sid, ids) >= 0 ? true : false;
	}

	@Override
	public boolean deletePicturesBySids(int[] sids) {
		return dao.deletePicturesBySids(sids) >= 0 ? true : false;
	}

}
